//
//  ProductDetailInfoCell.m
//  BaseProject
//
//  Created by 王洋 on 2020/7/21.
//  Copyright © 2020 王洋. All rights reserved.
//

#import "ProductDetailInfoCell.h"

@implementation ProductDetailInfoCell

- (void)awakeFromNib {
    [super awakeFromNib];

    self.priceLab.userInteractionEnabled = YES;
      [self.priceLab addGestureTapEventHandle:^(id  _Nonnull sender, UITapGestureRecognizer * _Nonnull gestureRecognizer) {
          if (self.ProductDetailInfoLoginBlock) {
              self.ProductDetailInfoLoginBlock();
          }
      }];

}

- (void)fillCellWithModel:(CommonPackageModel *)model {
    
    
//    if ([TTUserModel sharedObject].token.length > 0) {
        self.priceLab.text = [NSString stringWithFormat:@"¥%@",[Utilities changeDoubleToString:model.goodsActivePrice]];
//    } else {
//        self.priceLab.text = @"登录后查看补贴价";
//    }

    self.proNameLab.text = model.goodsName;
    
//    if (model.isNewId.length > 0) {
//
//        self.freeNewIcon.hidden = NO;
//        self.freeNewWidth.constant = 60;
//        self.freeNewTrading.constant = 5;
//
//    } else {
        
        self.freeNewIcon.hidden = YES;
        self.freeNewWidth.constant = CGFLOAT_MIN;
        self.freeNewTrading.constant = CGFLOAT_MIN;
//    }
    
}

@end
